<?php
/*
 * Quark PHP Framework
 * Copyright 2011, Sahib Alejandro Jaramillo Leo.
 * http://quarkphp.com/
 * Licensed under the GNU General Public License (http://www.gnu.org/licenses/gpl.html).
 */
/**
 * Definicion de clase MetaInfo
 * @filesource
 */
/**
 * Clase para trabajar con meta tags.
 * @author sahib
 */
class MetaInfo extends HtmlElementsHandler {

	/**
	 * (non-PHPdoc)
	 * @see HtmlElementsHandler::write()
	 */
	public function write( $meta_info, $return = FALSE ) {

		$attrs = array();
		
		foreach( $meta_info as $attr => $val )
			$attrs[] = $attr . '="' . $val . '"';
		
		$html = '<meta ' . implode( ' ', $attrs ) . ">\n";
		
		if( $return )
			return $html;
		else
			echo $html;
	}
}